package ooday03;

import java.util.SplittableRandom;

public abstract class Animal {
    String name;
    int age;
    String colour;
    Animal(){

    }
    Animal (String name,int age,String colour){
        this.name=name;
        this.age=age;
        this.colour=colour;
    }
    void drink(){
        System.out.println(colour+"色的"+age+"岁的名字叫"+name+"的正在喝水");
    }
     abstract void eat();
}
//共有放超类，部分共有放接口
/*interface Day{
     public abstract void eat();


}*/
 //重写接口里的方法，方法前必须加public